package com.lijian.controller;

import com.alibaba.druid.stat.DruidStatManagerFacade;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DruidStatController {

    @GetMapping("/druid/stat")
    @ApiOperation(value = "德鲁伊数据源监控")
    public Object druidStat(){
        //该方法可获取所有的数据源监控数据
        return DruidStatManagerFacade.getInstance().getDataSourceStatDataList();
    }
}
